package cloudgamesaumysql

import (
	"github.com/shopspring/decimal"
	"gorm.io/gorm"
	"time"
)

/*
  @author liubogeng
  @date   2025/2/25 21:44
*/

// CGGameAUDaily 云游戏AU日报表
type CGGameAUDaily struct {
	ID           int64 `json:"id" gorm:"column:id;type:bigint;primaryKey;autoIncrement;comment:ID"`
	NewUserDNU   int64 `json:"new_user_dnu" gorm:"column:new_user_dnu;type:bigint;not null;default:0;comment:新用户DNU；dnu：统计当天总计新账号数"`
	UserLoginDAU int64 `json:"user_login_dau" gorm:"column:user_login_dau;type:bigint;not null;default:0;comment:用户登录DAU；dau：有用户登录平台，就计算为一个活跃用户，当天去重"`
	UserLoginPCU int64 `json:"user_login_pcu" gorm:"column:user_login_pcu;type:bigint;not null;default:0;comment:用户登录PCU；pcu：同时最高用户登录数"`
	//UserStartGameDAU                           int64           `json:"user_start_game_dau" gorm:"column:user_start_game_dau;type:bigint;not null;default:0;comment:用户开始游戏DAU；dau：有用户开始游戏，就计算为一个活跃用户，当天去重"`
	//UserStartGamePCU                           int64           `json:"user_start_game_pcu" gorm:"column:user_start_game_pcu;type:bigint;not null;default:0;comment:用户开始游戏PCU；pcu：同时最高用户开始游戏数"`
	TransactionOfThirdPartyOrderRechargeAmount decimal.Decimal `json:"transaction_of_third_party_order_recharge_amount" gorm:"column:transaction_of_third_party_order_recharge_amount;type:decimal(12,2);not null;default:0.00;comment:商城充值(元)"`
	TransactionOfThirdPartyOrderConsumeAmount  decimal.Decimal `json:"transaction_of_third_party_order_consume_amount" gorm:"column:transaction_of_third_party_order_consume_amount;type:decimal(12,2);not null;default:0.00;comment:商城消费(元)"`
	TransactionOfPlatformRechargeAmount        decimal.Decimal `json:"transaction_of_platform_recharge_amount" gorm:"column:transaction_of_platform_recharge_amount;type:decimal(12,2);not null;default:0.00;comment:云玩点充值(元)"`
	TransactionOfDirectPurchaseAmount          decimal.Decimal `json:"transaction_of_direct_purchase_amount" gorm:"column:transaction_of_direct_purchase_amount;type:decimal(12,2);not null;default:0.00;comment:直购(元)"`
	//TransactionOfPlatformRechargeDuration      int64           `json:"transaction_of_platform_recharge_duration" gorm:"column:transaction_of_platform_recharge_duration;type:bigint;not null;default:0;comment:充值获取(分钟)"`
	//TransactionOfPlatformConsumeDuration       int64           `json:"transaction_of_platform_consume_duration" gorm:"column:transaction_of_platform_consume_duration;type:bigint;not null;default:0;comment:充值消耗(分钟)"`
	//AllGainedFreeDuration                      int64           `json:"all_gained_free_duration" gorm:"column:all_gained_free_duration;type:bigint;not null;default:0;comment:免费获取(分钟)"`
	//AllConsumedFreeDuration                    int64           `json:"all_consumed_free_duration" gorm:"column:all_consumed_free_duration;type:bigint;not null;default:0;comment:免费消耗(分钟)"`
	//HsnTotal                                   int64           `json:"hsn_total" gorm:"column:hsn_total;type:bigint;not null;default:0;comment:配置当前海马云的总实例数"`
	UserStartGame                 int64          `json:"user_start_game" gorm:"column:user_start_game;type:bigint;not null;default:0;comment:每次调用开始游戏，统计一个，统计当天累计次数"`
	TodayPlayGameByDifferentUsers int64          `json:"today_play_game_by_different_users" gorm:"column:today_play_game_by_different_users;type:bigint;not null;default:0;comment:开始游戏账号数；区分用户的前提下，统计开始游戏的次数"`
	TimeOfDaily                   time.Time      `json:"time_of_daily" gorm:"column:time_of_daily;type:datetime;comment:日报创建时间"`
	CreatedAt                     time.Time      `json:"created_at" gorm:"column:created_at;type:datetime;comment:该条记录创建时间"`
	UpdatedAt                     time.Time      `json:"updated_at" gorm:"column:updated_at;type:datetime;comment:该条记录修改时间"`
	DeletedAt                     gorm.DeletedAt `json:"-" gorm:"index;type:datetime;comment:该条记录删除时间"`
}

func (CGGameAUDaily) TableName() string {
	return "cg_game_au_daily"
}
